package com.taxi.driver.module.main.mine.evaluation;

import android.content.Context;
import android.text.TextUtils;

import com.qianxx.adapter.SuperAdapter;
import com.qianxx.adapter.internal.SuperViewHolder;
import com.taxi.driver.R;
import com.taxi.driver.module.vo.CommentVO;
import com.taxi.driver.util.TimeUtils;

import java.util.ArrayList;

public class EvaluationAdapter extends SuperAdapter<CommentVO>{

    public EvaluationAdapter(Context context) {
        super(context, new ArrayList<CommentVO>(), R.layout.item_passengers_evaluation);
    }

    @Override
    public void onBind(SuperViewHolder holder, int viewType, int position, CommentVO item) {
        holder.setText(R.id.tv_date, TimeUtils.paseDate(item.date));
        if(TextUtils.isEmpty(item.content)){
            holder.setText(R.id.tv_content,"系统默认评价");
        }else{
            holder.setText(R.id.tv_content,item.content);
        }
    }
}
